home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14316 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.compulink.gr!athena!lonewolf
  2. From: lonewolf@athena.compulink.gr (Costas Vlassis)
  3. Newsgroups: comp.lang.c
  4. Subject: Small problem with C...
  5. Date: 13 Apr 1996 11:45:19 GMT
  6. Organization: CompuLink Network S.A.
  7. Message-ID: <4ko44f$jf2@venus.compulink.gr>
  8. NNTP-Posting-Host: 193.92.197.99
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11.     Well I am taking my first steps with C on my Linux box with GCC 
  12. 2.7.0...
  13.  
  14.     What I want to do is this :
  15.  
  16. Make a matrix, 50 x 50 x 8, fill this matrix with random numbers with the 
  17. following limitations :
  18.  
  19. - All the matrix elements must be positive integers.
  20.  
  21. - The elements [x][y][1], [x][y][3], [x][y][5], must be over 10 and lower 
  22. than 80.
  23.  
  24. - The sum of the elements ([x][y][1] + [x][y][3] + [x][y][5]) must not
  25. exceed 100 for every x,y.
  26.  
  27. - The elements [x][y][2], [x][y][4], [x][y][6] must be from 1-5 for every 
  28. x,y.
  29.  
  30. - The elements [x][y][7] must be from 1-9 for every x,y
  31.  
  32. - The elements [x][y][8] must be 0 for every x,y
  33.  
  34.     Maybe it is easy, maybe not... well If someone can contribute the 
  35. code it would be of big help...!!!
  36.  
  37.     Thanks in adnvance,
  38.     Costas Vlassis
  39.     lonewolf@compulink.gr
  40.  
  41.